package com.sxran.im.handler;

import com.sxran.im.dao.ImUserMapper;
import com.sxran.im.info.ImUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 因为uni-app 的viedo对象没有srcObject属性，只能通过web-view的形式来实现webRTC。
 */
@Slf4j
@Service
public class AudioCallIframeCmdHandler extends AbstractCmdHandler<ImUser>{
    @Resource
    private ImUserMapper imUserMapper;
    @Override
    public Object doBeanService(ImUser bean) {
        // 修改用户为下线状态。
        ImUser user = new ImUser();
        user.setStatus(1);
        user.setUserId(bean.getUserId());
        imUserMapper.updateById(user);
        return user;
    }
}
